﻿using System;
using System.Collections.Generic;
using System.Text;
using AMS.Common;

namespace AMS.Configuration
{
    /// <summary>
    /// 数据字典错误
    /// </summary>
    public class DictException : AMS.Common.AmsException
    {
        /// <summary>
        /// 数据字典错误
        /// </summary>
        public DictException() { }
        /// <summary>
        /// 数据字典错误
        /// </summary>
        /// <param name="message"></param>
        public DictException(string message)
            : base(message)
        {
        }
    }

    public class DictKeyNotFoundException : DictException
    {
         /// <summary>
        /// 数据字典错误
        /// </summary>
        public DictKeyNotFoundException() { }
        /// <summary>
        /// 数据字典错误
        /// </summary>
        /// <param name="message"></param>
        public DictKeyNotFoundException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// 数据字典错误
        /// </summary>
        /// <param name="key"></param>
        public DictKeyNotFoundException(int key)
            :base(LocaleFramework.GetFormattedString("@NotFound", key))
        {
            
        }
    }
}
